package com.bjpowernode;

import com.bjpowernode.model.User;
import jdk.nashorn.internal.objects.annotations.Constructor;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.FactoryBean;
import sun.applet.AppletClassLoader;
import sun.security.jca.GetInstance;

import javax.xml.ws.soap.Addressing;
import java.io.*;
import java.time.LocalDate;
import java.util.*;
import java.util.concurrent.FutureTask;
import java.util.concurrent.ThreadPoolExecutor;

public  class test01 {


        private static final char[] data = new char[]{
                '零','壹','贰','叁','肆','伍','陆','柒','捌','玖'
        };
        private static final char[] units = new char[]{
                '元','拾','佰','仟','万','拾','佰','仟','亿'
        };
        public static void main(String[] args) {
            System.out.println(
                    convert(201));
            System.out.println(
                    convert(201));


        }

        public static String convert(int money)
        {
            StringBuffer sbf = new StringBuffer();
            int unit = 0;
            while(money!=0)
            {
                sbf.insert(0,units[unit++]);
                int number = money%10;

                sbf.insert(0, data[number]);
                money /= 10;
            }
            return sbf.toString();
        }
}


